xpcom.getscript("chrome://jbzw/content/jquery.js");
xpcom.getscript("chrome://jbzw/content/plugins.js");
xpcom.getscript("chrome://jbzw/content/makeobj.js");

// xul stuff
document.body = document;

// jbzw
jbzw = {
	current: { saved: false },
	help: function(obj){
		window.open("help.xul#" + obj, "window-help", "centerscreen=yes,resizable=yes,chrome=yes");
	}
};

//main
$(function(){
	// startup
	/*$("#ui-display").attr({
		height: window.innerHeight / 1.5,
		width: (window.innerWidth / 10) * 9
	});
	var cv = $("#ui-display").get(0).getContext("2d");
	cv.fillRect(0, 0, 1000, 1000);*/
	
	// events
	$("#tool-new").click(function(){});
	$("#tool-open").click(function(){});
	$("#tool-save").click(function(){});
	$("#tool-saveas").click(function(){});
	$("#tool-exit").click(function(){ window.close(); });
	
	$("#tool-options").click(function(){ window.open("prefs.xul", "window-options", "centerscreen=yes,resizable=yes,chrome=yes,toolbar=yes"); });
	
	$("#tool-help").click(function(){ window.open("help.xul", "window-help", "centerscreen=yes,resizable=yes,chrome=yes"); });
	$("#tool-about").click(function(){ alert("jBZW version alpha 3"); });
});